// pagination-mixin.vue
export default {
    data() {
        return {
            pagination: {
                page: 1,
                pageSize: 10,
                total: 0,
                pageSizes: [10, 20, 30, 40, 50, 100],
                layout: 'prev, pager, next'
            }
        }
    },
    computed: {
        requestData() {
            return {
                page: this.pagination.page,
                limit: this.pagination.pageSize
            }
        }
    },
    methods: {
        init() {
        },
        pageChange(page) {
            this.pagination.page = page
            this.init()
        },
        sizeChange(pageSize) {
            this.pagination.pageSize = pageSize
        }
    }
}
